package com.itheima.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


/**
 * 切入点
 */
@Component
@Aspect
public class MyAspect {

    @Pointcut("execution(* com.itheima.dao.BookDao.save())")        //定位到接口
//    @Pointcut("execution(* com.itheima.dao.Impl.BookDaoImpl.*())")  定位到实现类
    private void pt(){}

    @Before("pt()")
    public void method() {
        System.out.println(System.currentTimeMillis());
    }

}
